KeyValueBasedDefaultStatesManagerRepo

class KeyValueBasedDefaultStatesManagerRepo<T : State>(keyValueRepo: KeyValueRepo<Any, T>) : DefaultStatesManagerRepo<T>

Constructors

Link copied to clipboard
fun <T : State> KeyValueBasedDefaultStatesManagerRepo(keyValueRepo: KeyValueRepo<Any, T>)

Functions

Link copied to clipboard
open suspend override fun contains(context: Any): Boolean
Link copied to clipboard
open suspend override fun getContextState(context: Any): T?
Link copied to clipboard
open suspend override fun getStates(): List<T>
Link copied to clipboard
open suspend override fun removeState(state: T)

Remove exactly state. In case if internally State.context is busy with different State, that State should NOT be removed

Link copied to clipboard
open suspend override fun set(state: T)

Must save state as current state of chain with State.context of state